﻿Imports System.Data.SqlClient
Imports System.Configuration
Public Class conexion
    Private cn As SqlConnection
    Public Function abrir() As SqlConnection

        cn = New SqlConnection(ConfigurationManager.ConnectionStrings("cnConex").ConnectionString)
        cn.Open()
        Return cn
    End Function

    Public Sub Cerrar()
        cn.Close()
        cn.Dispose()
    End Sub
End Class
